package com.hsylient.jpa.controller;

import com.hsylient.jpa.entity.Student;
import com.hsylient.jpa.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ReadingListController {

    @Autowired
    private StudentMapper studentMapper;

    @GetMapping("/get/message")
    public List<Student> getMessage(@RequestParam Integer id) {
        return studentMapper.findAll();
    }

}
